{% extends "LololBattleBundle::layout.html.twig" %}

{% block javascripts %} 
{{ parent() }}

{% endblock %}

{% block lolol_alert %}
{% endblock %}

{% block lolol_title %}{{ 'battle.report'|trans }}{% endblock %}

{% block lolol_help_body %}c

{% endblock %}


{% block lolol_main %}
<div class="panel-group" id="accordion">
  <div class="panel panel-{% if result == 0 %}warning{% elseif result == 1 %}success{% elseif 2 %}danger{% endif %}">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
			+ {% if result == 0 %}{{ 'battle.report.draw'|trans }}{% elseif result == 1 %}{{ 'battle.report.victory'|trans }}{% elseif 2 %}{{ 'battle.report.defeat'|trans }}{% endif %}
        </a>
      </h4>
    </div>
    <div id="collapseOne" class="panel-collapse collapse">
      <div class="panel-body">      
		{% for log in logs %}
			{% spaceless %}
			<div class="row">
			<p class="{% for logType in log.logTypesAsArray %}{{ logType }} {% endfor %}">
				{% if log.icon %}<i class="fa {{ log.icon }} fa-fw"></i>{% endif %}{% if log.key is empty %}&nbsp;{% else %}[{{ log.time|number_format(2, '.') }}] {{ log.key|trans(log.parametersArray) }}{% endif %}
			</p>
			</div>
			{% endspaceless %}
		{% endfor %}
		
      </div>
    </div>
  </div>
</div>

{% endblock %}